package com.cqemme.activitiservice.feign;

import com.cqemme.activitiservice.feign.fallback.SchoolServiceFeignFallbackFactory;
import com.cqemme.comm.po.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 学校服务
 *
 * @author daibin
 */
@FeignClient(value = "school-service", fallbackFactory= SchoolServiceFeignFallbackFactory.class)
public interface SchoolServiceFeign {

    /**
     *
     * 传入学生id 查询老师信息
     *
     * @param
     * @return
     */
    @RequestMapping(value = "/teacher/feignQueryByStudentId", method = RequestMethod.GET)
    Result queryAllByEnumType(@RequestParam("studentId") String studentId);


    /**
     * 查询设备信息
     * @param deviceNumber 设备编号
     * @return 设备详情
     */
    @GetMapping(value = "/device/queryByDeviceNumber")
    String queryByDeviceNumber(@RequestParam(value = "deviceNumber") String deviceNumber);

    /**
     * 查询设备的上级所有信息
     * /device/queryCriAndOrgByOrgCode
     * @param orgCode 组织编码
     * @param type 取值类型 1=只获取上级组织 2只获取上级区域 0=全部-即上级组织和上级区域默认0
     * @return 设备详情
     */
    @GetMapping(value = "/device/queryCriAndOrgByOrgCode")
    String queryCriAndOrgByOrgCode(@RequestParam(value = "orgCode") String orgCode, @RequestParam(value = "type") Integer type  );


    /**
     * 查询学生扩展信息，包括学生班级
     * @param idCardNo 学生idCardNo
     * @return 设备详情
     */
    @GetMapping(value = "/student/getStudentExtByStudentIdCardNo")
    String getStudentExtByStudentIdCardNo(@RequestParam(value = "idCardNo") String idCardNo );

}
